import java.util.Arrays;

public class Task {

    public static void main(String[] args) {
        Student[] students = {
                new Student("王五", 1.6, 20),
                new Student("李四", 1.7, 19),
                new Student("赵六", 1.7, 20),
                new Student("tianqi", 1.8, 22),
                new Student("tianan", 1.8, 22),
                new Student("张三", 1.8, 18),
                new Student("王振", 1.6, 22),
        };

        sortStudent(students);
        System.out.println("---------------------");
        sortStudentByAgeDesc(students);
    }

    public static void sortStudentByAgeDesc(Student[] students) {
        // 请通过MyCompare的compareByAgeDesc方法实现按照年龄降序排序
        /* TODO */

        for (Student student : students) {
            System.out.println(student.getName() + ": "
                    + student.getAge() + " -> "
                    + student.getHeight());
        }
    }

    public static void sortStudent(Student[] students) {
        // 请通过MyCompare类的compareStudent方法
        // 实现按照年龄升序排序、再按照身高降序排序
        /* TODO */

        for (Student student : students) {
            System.out.println(student.getName() + ": "
                    + student.getAge() + " -> "
                    + student.getHeight());
        }
    }

}